import java.io.*;

public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        File file=new File("test.txt");
        FileInputStream fis=new FileInputStream(file);
        ObjectInputStream ois=new ObjectInputStream(fis);
        Object a= ois.readObject();
        Student stu=(Student)a;
        System.out.println(stu);
        System.out.println("读入完成");
        ois.close();
    }
}
